<?php defined('IN_YUNYECMS') or exit('No permission.'); ?><!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title><?php echo $seo["title"] ;?></title>
  <meta name="keywords" content="<?php echo $seo["keywords"] ;?>" />
  <meta name="description" content="<?php echo $seo["description"] ;?>" />
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

  <link href="<?php echo YUNYECMS_PUBLIC;?>plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" />
  <!-- Font Awesome -->
  <link rel="stylesheet" href="<?php echo YUNYECMS_UI;?>plugins/fontawesome-free/css/all.min.css"> <!-- Theme style -->
  <link rel="stylesheet" href="<?php echo YUNYECMS_UI;?>plugins/iCheck/all.css">
  <link rel="stylesheet" href="<?php echo YUNYECMS_UI;?>dist/css/AdminLTE.min.css">
  <!-- AdminLTE Skins. Choose a skin from the css/skins
       folder instead of downloading all of them to reduce the load. -->
  <link rel="stylesheet" href="<?php echo YUNYECMS_UI;?>dist/css/skins/_all-skins.min.css">
  <link href="<?php echo YUNYECMS_UI;?>plugins/bootstrap-switch/css/bootstrap-switch.min.css" rel="stylesheet" type="text/css" />
  <link rel="stylesheet" href="<?php echo YUNYECMS_UI;?>dist/css/plugins.css">
  <link rel="stylesheet" href="<?php echo YUNYECMS_UI;?>dist/css/member.css">
  <link rel="stylesheet" href="<?php echo TPL;?>static/css/buy.css">
  <link rel="shortcut icon" href="<?php echo YUNYECMS_UI;?>dist/img/favicon.ico" />
  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>

<body class="hold-transition skin-green sidebar-mini fixed">
  <div class="wrapper">
    <?php include tpl("left","member"); ?>
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
      <!-- Content Header (Page header) -->
      <div class="content-header">
        <div class="container-fluid">
          <div class="row mb-2">
            <div class="col-sm-6">
              <ol class="breadcrumb float-sm-left">
                <li class="breadcrumb-item" id="homeitem"><a href="<?php echo url('member/member/index');?>"
                    target="maincontent"> <i class="fa fa-home"></i>
                    首页</a></li>
                <?php if(is_array($breadcumb)): $i = -1; $__DATA__ = $breadcumb;if(count($__DATA__)==0 )  echo "" ;foreach($__DATA__ as $key=>$v): $mod = ($i % 2 );++$i;?>
                <?php if($i+1!=count($breadcumb)) { ?>
                <li class="breadcrumb-item"><a href="<?php echo $v["url"] ;?>"><?php echo $v["title"] ;?></a></li>
                <?php } else { ?>
                <li class="breadcrumb-item active"><?php echo $v["title"] ;?></li>
                <?php } ?>
                <?php  endforeach;  endif; ?>
              </ol>
            </div>
            <div class="col-sm-6">
              <?php include tpl("fast","member"); ?>
            </div>
          </div>
        </div>
      </div>
      <div class="container-fluid" id="mainwrap">
        <!-- Main content -->
        <section class="content">
          <div class="row">
            <!-- left column -->
            <div class="col-md-12">
              <div class="card box-primary card-outline">
                <div class="card-header">
                  <div class="col-xs-12 col-sm-12 col-md-8 pb10">
                    <h3 class="card-title">我的订单</h3> &nbsp;
                  </div>
                </div>
                <!-- /.box-header -->
                <?php if(!empty($list)) { ?>
                <div class="card-body">
                  <div class="col-md-12">
                    <table class="table table-bordered table-striped ">
                      <thead>
                        <tr>
                          <th width="100">订单号</th>
                          <th width="200">商品</th>
                          <th width="200">金额</th>
                          <th width="154">时间</th>
                          <th width="50">状态</th>
                        </tr>
                      </thead>
                      <tbody id="catlist">
                        <?php if(is_array($list)): $i = -1; $__DATA__ = $list;if(count($__DATA__)==0 )  echo "" ;foreach($__DATA__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                        <tr>
                          <td><?php echo $vo["sn"] ;?></td>
                          <td>
                            <?php if(is_array($vo['goods'])): $i = -1; $__DATA__ = $vo['goods'];if(count($__DATA__)==0 )  echo "" ;foreach($__DATA__ as $key=>$v): $mod = ($i % 2 );++$i;?>
                            <a href="<?php echo $v["url"] ;?>" target="_blank"> <?php echo $v["title"] ;?> <span><svg xmlns="http://www.w3.org/2000/svg"
                                  xmlns:xlink="http://www.w3.org/1999/xlink" width="8px" height="8px">
                                  <path fill-rule="evenodd" fill="rgb(130, 135, 167)"
                                    d="M0.070,7.929 C0.118,7.976 0.179,8.000 0.241,8.000 C0.302,8.000 0.364,7.976 0.411,7.929 L3.992,4.341 L7.573,7.929 C7.620,7.976 7.682,8.000 7.743,8.000 C7.805,8.000 7.867,7.976 7.914,7.929 C8.008,7.835 8.008,7.682 7.914,7.588 L4.333,4.000 L7.914,0.412 C8.008,0.318 8.008,0.165 7.914,0.070 C7.820,-0.024 7.667,-0.024 7.573,0.070 L3.992,3.658 L0.411,0.071 C0.317,-0.024 0.165,-0.024 0.070,0.071 C-0.024,0.165 -0.024,0.318 0.070,0.412 L3.651,4.000 L0.070,7.588 C-0.024,7.682 -0.024,7.835 0.070,7.929 Z" />
                                </svg></span> <?php echo $v["num"] ;?>
                              ￥<?php echo $v["price"]*$v["num"]?>元 </a><br>
                            <?php  endforeach;  endif; ?>
                          </td>
                          <td>￥<?php echo $vo["money"] ;?></td>
                          <td align="left">
                            <?php echo udate($vo['addtime']);?>
                          </td>
                          <td>
                            <?php if($vo['status']==1) { ?> <span class="badge bg-success"><i class="fa fa-check"></i>已付款</span>
                            <?php } elseif ($vo["status"]==0) { ?><span class="badge bg-danger"> 未付款</span>
                            <a class='btn btn-primary btn-xs btn-flat'
                              href='<?php echo url("shop/orders/onlinepay",array("orderid"=>$vo["id"]));?>'> 去付款 </a>
                            <?php } elseif ($vo["status"]==2) { ?><span class="label label-info"><i class="fa fa-check"></i>
                              已完成</span>
                            <?php } ?>
                          </td>
                        </tr>
                        <?php  endforeach;  endif; ?>
                      </tbody>
                    </table>

                  </div>
                  <ul class="pagination pull-left">
                    <?php echo $page;?>
                  </ul>
                </div>
                <?php } else { ?>
                <div class="container">
                  <div class="callout callout-info">
                    <h4><i class="icon fa fa-info"></i> 提示信息：</h4>
                    暂时没有任何信息<br />
                  </div>
                </div>
                <?php } ?>
              </div>
              <!-- /.box -->
            </div>
            <!--/.col (left) -->
          </div>
          <!-- /.row -->
        </section>
        <!-- /.content -->
      </div>

    </div>
    <!-- /.content-wrapper -->
    <?php include tpl("foot","member"); ?>

    <!-- Add the sidebar's background. This div must be placed
       immediately after the control sidebar -->

  </div>
  <!-- ./wrapper -->
  <!-- jQuery 2.2.3 -->
  <script src="<?php echo YUNYECMS_UI;?>plugins/jQuery/jquery-3.6.1.min.js"></script>
  <!-- Bootstrap 3.3.6 -->
  <script src="<?php echo YUNYECMS_UI;?>bootstrap/js/bootstrap.min.js"></script>
  <!-- AdminLTE App -->
  <script src="<?php echo YUNYECMS_UI;?>dist/js/adminlte.js"></script>

</body>

</html>